package cn.livingCloud.dto;

import cn.livingCloud.entity.core.SelfBinding;
import cn.livingCloud.utils.DateUtils;
import org.apache.commons.lang.StringUtils;

/**
 * Created by DingJie on 2016/6/23.
 */
public class SelfBindingDto {
    private String uuid;
    private String employeeName;
    private String deptName;
    private String phone;
    private boolean auditing;
    private String createDateTime;
    private Boolean archive;
    private String memberUuid;
    private MemberDto memberDto;

    public SelfBindingDto() {
    }

    public SelfBindingDto(SelfBinding item) {
        this.uuid = item.getUuid();
        this.employeeName = item.getEmployeeName();
        this.deptName = item.getDeptName();
        this.phone = item.getPhone();
        this.archive = item.getArchive();
        this.auditing = item.isAuditing();
        this.createDateTime = DateUtils.toDateText(item.getCreateDateTime()
                , DateUtils.DEFAULT_DATE_TIME_FORMAT);
        this.memberUuid = item.getMemberUuid();
        if (StringUtils.isNotEmpty(item.getMemberUuid())) {
            memberDto = new MemberDto(item.getMember());
        }
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public boolean isAuditing() {
        return auditing;
    }

    public void setAuditing(boolean auditing) {
        this.auditing = auditing;
    }

    public String getCreateDateTime() {
        return createDateTime;
    }

    public void setCreateDateTime(String createDateTime) {
        this.createDateTime = createDateTime;
    }

    public Boolean getArchive() {
        return archive;
    }

    public void setArchive(Boolean archive) {
        this.archive = archive;
    }

    public String getMemberUuid() {
        return memberUuid;
    }

    public void setMemberUuid(String memberUuid) {
        this.memberUuid = memberUuid;
    }

    public MemberDto getMemberDto() {
        return memberDto;
    }

    public void setMemberDto(MemberDto memberDto) {
        this.memberDto = memberDto;
    }
}
